/*
 * @Author: xiaosihan
 * @Date: 2024-10-30 23:49:16
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-10-31 02:14:04
 */

// centerTopStore.ts

import { observable, configure, toJS } from 'mobx';
import doubtfulSituationStore from '../doubtfulSituationStore';
configure({ enforceActions: 'never' });

const centerTopStore = observable(
  {
    active: 0,
    active1: 1,
    next() {
      const data = toJS(doubtfulSituationStore.regulatory_model_List);
      this.active = (this.active + 1) % data.length;
      this.active1 = (this.active + 1) % data.length;
    },

    prev() {
      const data = toJS(doubtfulSituationStore.regulatory_model_List);
      this.active = (this.active - 1 + data.length) % data.length;
      this.active1 = (this.active + data.length) % data.length;
    },
  },
  {},
  { deep: false }
);

export default centerTopStore;
